<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AceCRC: /home/brian/src/AceCRC/src/ace_crc/crc16modbus_nibble.hpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AceCRC
   &#160;<span id="projectnumber">1.1.1</span>
   </div>
   <div id="projectbrief">Cyclic Redundancy Check (CRC) algorithms (e.g. crc16ccitt, crc32) programmatically converted from C99 code generated by pycrc (https://pycrc.org) to Arduino C++ using namespaces and PROGMEM flash memory.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_7e2fca1243a23cea849d389c30292e19.html">ace_crc</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">crc16modbus_nibble.hpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Functions and types for CRC checks.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;stdlib.h&gt;</code><br />
<code>#include &lt;stdint.h&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for crc16modbus_nibble.hpp:</div>
<div class="dyncontent">
<div class="center"><img src="crc16modbus__nibble_8hpp__incl.png" border="0" usemap="#a_2home_2brian_2src_2AceCRC_2src_2ace__crc_2crc16modbus__nibble_8hpp" alt=""/></div>
<map name="a_2home_2brian_2src_2AceCRC_2src_2ace__crc_2crc16modbus__nibble_8hpp" id="a_2home_2brian_2src_2AceCRC_2src_2ace__crc_2crc16modbus__nibble_8hpp">
<area shape="rect" title="Functions and types for CRC checks." alt="" coords="5,5,195,61"/>
<area shape="rect" title=" " alt="" coords="18,109,89,136"/>
<area shape="rect" title=" " alt="" coords="113,109,183,136"/>
</map>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="crc16modbus__nibble_8hpp__dep__incl.png" border="0" usemap="#a_2home_2brian_2src_2AceCRC_2src_2ace__crc_2crc16modbus__nibble_8hppdep" alt=""/></div>
<map name="a_2home_2brian_2src_2AceCRC_2src_2ace__crc_2crc16modbus__nibble_8hppdep" id="a_2home_2brian_2src_2AceCRC_2src_2ace__crc_2crc16modbus__nibble_8hppdep">
<area shape="rect" title="Functions and types for CRC checks." alt="" coords="109,5,299,61"/>
<area shape="rect" href="crc16modbus__nibble_8cpp.html" title="Functions and types for CRC checks." alt="" coords="5,109,195,165"/>
<area shape="rect" href="AceCRC_8h_source.html" title=" " alt="" coords="219,117,397,158"/>
</map>
</div>
</div>
<p><a href="crc16modbus__nibble_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a21dcdb9db1a18101e1a4194a6c8c17ce"><td class="memItemLeft" align="right" valign="top">typedef uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crc16modbus__nibble_8hpp.html#a21dcdb9db1a18101e1a4194a6c8c17ce">ace_crc::crc16modbus_nibble::crc_t</a></td></tr>
<tr class="memdesc:a21dcdb9db1a18101e1a4194a6c8c17ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">The type of the CRC values.  <a href="crc16modbus__nibble_8hpp.html#a21dcdb9db1a18101e1a4194a6c8c17ce">More...</a><br /></td></tr>
<tr class="separator:a21dcdb9db1a18101e1a4194a6c8c17ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a04c564d0be282a80c48ffc4ab3623c52"><td class="memItemLeft" align="right" valign="top">crc_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crc16modbus__nibble_8cpp.html#a04c564d0be282a80c48ffc4ab3623c52">ace_crc::crc16modbus_nibble::crc_reflect</a> (crc_t data, size_t data_len)</td></tr>
<tr class="memdesc:a04c564d0be282a80c48ffc4ab3623c52"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reflect all bits of a <em>data</em> word of <em>data_len</em> bytes.  <a href="crc16modbus__nibble_8cpp.html#a04c564d0be282a80c48ffc4ab3623c52">More...</a><br /></td></tr>
<tr class="separator:a04c564d0be282a80c48ffc4ab3623c52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07e553ed323a606bfbd7cfd9cc4b479d"><td class="memItemLeft" align="right" valign="top">crc_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crc16modbus__nibble_8hpp.html#a07e553ed323a606bfbd7cfd9cc4b479d">ace_crc::crc16modbus_nibble::crc_init</a> (void)</td></tr>
<tr class="memdesc:a07e553ed323a606bfbd7cfd9cc4b479d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the initial crc value.  <a href="crc16modbus__nibble_8hpp.html#a07e553ed323a606bfbd7cfd9cc4b479d">More...</a><br /></td></tr>
<tr class="separator:a07e553ed323a606bfbd7cfd9cc4b479d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7f362995f974e6e73b42b7b20e7dca4"><td class="memItemLeft" align="right" valign="top">crc_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crc16modbus__nibble_8cpp.html#af7f362995f974e6e73b42b7b20e7dca4">ace_crc::crc16modbus_nibble::crc_update</a> (crc_t crc, const void *data, size_t data_len)</td></tr>
<tr class="memdesc:af7f362995f974e6e73b42b7b20e7dca4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update the crc value with new data.  <a href="crc16modbus__nibble_8cpp.html#af7f362995f974e6e73b42b7b20e7dca4">More...</a><br /></td></tr>
<tr class="separator:af7f362995f974e6e73b42b7b20e7dca4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3646fdb74671d13f43e751ab37dc1772"><td class="memItemLeft" align="right" valign="top">crc_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crc16modbus__nibble_8hpp.html#a3646fdb74671d13f43e751ab37dc1772">ace_crc::crc16modbus_nibble::crc_finalize</a> (crc_t crc)</td></tr>
<tr class="memdesc:a3646fdb74671d13f43e751ab37dc1772"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the final crc value.  <a href="crc16modbus__nibble_8hpp.html#a3646fdb74671d13f43e751ab37dc1772">More...</a><br /></td></tr>
<tr class="separator:a3646fdb74671d13f43e751ab37dc1772"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3af068bfa31d7b80ed986bf8a565768c"><td class="memItemLeft" align="right" valign="top">crc_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crc16modbus__nibble_8hpp.html#a3af068bfa31d7b80ed986bf8a565768c">ace_crc::crc16modbus_nibble::crc_calculate</a> (const void *data, size_t data_len)</td></tr>
<tr class="memdesc:a3af068bfa31d7b80ed986bf8a565768c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the crc in one-shot.  <a href="crc16modbus__nibble_8hpp.html#a3af068bfa31d7b80ed986bf8a565768c">More...</a><br /></td></tr>
<tr class="separator:a3af068bfa31d7b80ed986bf8a565768c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:acb91882091aa134362cf7a7b2ce0bc7a"><td class="memItemLeft" align="right" valign="top">const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crc16modbus__nibble_8hpp.html#acb91882091aa134362cf7a7b2ce0bc7a">ace_crc::crc16modbus_nibble::CRC_ALGO_TABLE_DRIVEN</a> = 1</td></tr>
<tr class="memdesc:acb91882091aa134362cf7a7b2ce0bc7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">The definition of the used algorithm.  <a href="crc16modbus__nibble_8hpp.html#acb91882091aa134362cf7a7b2ce0bc7a">More...</a><br /></td></tr>
<tr class="separator:acb91882091aa134362cf7a7b2ce0bc7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Functions and types for CRC checks. </p>
<p>Generated on Fri Feb 3 16:16:46 2023 by pycrc v0.10.0, <a href="https://pycrc.org">https://pycrc.org</a> using the configuration:</p><ul>
<li>Width = 16</li>
<li>Poly = 0x8005</li>
<li>XorIn = 0xffff</li>
<li>ReflectIn = True</li>
<li>XorOut = 0x0000</li>
<li>ReflectOut = True</li>
<li>Algorithm = table-driven</li>
</ul>
<p>This file defines the functions <a class="el" href="crc16modbus__nibble_8hpp.html#a07e553ed323a606bfbd7cfd9cc4b479d" title="Calculate the initial crc value.">crc_init()</a>, <a class="el" href="crc16ccitt__bit_8cpp.html#a72f1a838b36e313fbebdf0b521a99a7b" title="Update the crc value with new data.">crc_update()</a> and <a class="el" href="crc16modbus__nibble_8hpp.html#a3646fdb74671d13f43e751ab37dc1772" title="Calculate the final crc value.">crc_finalize()</a>.</p>
<p>The <a class="el" href="crc16modbus__nibble_8hpp.html#a07e553ed323a606bfbd7cfd9cc4b479d" title="Calculate the initial crc value.">crc_init()</a> function returns the initial <code>crc</code> value and must be called before the first call to <a class="el" href="crc16ccitt__bit_8cpp.html#a72f1a838b36e313fbebdf0b521a99a7b" title="Update the crc value with new data.">crc_update()</a>. Similarly, the <a class="el" href="crc16modbus__nibble_8hpp.html#a3646fdb74671d13f43e751ab37dc1772" title="Calculate the final crc value.">crc_finalize()</a> function must be called after the last call to <a class="el" href="crc16ccitt__bit_8cpp.html#a72f1a838b36e313fbebdf0b521a99a7b" title="Update the crc value with new data.">crc_update()</a>, before the <code>crc</code> is being used. is being used.</p>
<p>The <a class="el" href="crc16ccitt__bit_8cpp.html#a72f1a838b36e313fbebdf0b521a99a7b" title="Update the crc value with new data.">crc_update()</a> function can be called any number of times (including zero times) in between the <a class="el" href="crc16modbus__nibble_8hpp.html#a07e553ed323a606bfbd7cfd9cc4b479d" title="Calculate the initial crc value.">crc_init()</a> and <a class="el" href="crc16modbus__nibble_8hpp.html#a3646fdb74671d13f43e751ab37dc1772" title="Calculate the final crc value.">crc_finalize()</a> calls.</p>
<p>This pseudo-code shows an example usage of the API: </p><div class="fragment"><div class="line"><a class="code" href="crc16ccitt__bit_8hpp.html#a5a452c1a176f3899bffa9a34fc6143bf">crc_t</a> crc;</div>
<div class="line"><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> data[MAX_DATA_LEN];</div>
<div class="line"><span class="keywordtype">size_t</span> data_len;</div>
<div class="line"> </div>
<div class="line">crc = <a class="code" href="crc16ccitt__bit_8hpp.html#af879dac709082a4f581814eb7bd867c6">crc_init</a>();</div>
<div class="line"><span class="keywordflow">while</span> ((data_len = read_data(data, MAX_DATA_LEN)) &gt; 0) {</div>
<div class="line">    crc = <a class="code" href="crc16ccitt__bit_8cpp.html#a72f1a838b36e313fbebdf0b521a99a7b">crc_update</a>(crc, data, data_len);</div>
<div class="line">}</div>
<div class="line">crc = <a class="code" href="crc16ccitt__bit_8hpp.html#a4134925356ad8f90472ef171fe955a1f">crc_finalize</a>(crc);</div>
<div class="ttc" id="acrc16ccitt__bit_8cpp_html_a72f1a838b36e313fbebdf0b521a99a7b"><div class="ttname"><a href="crc16ccitt__bit_8cpp.html#a72f1a838b36e313fbebdf0b521a99a7b">ace_crc::crc16ccitt_bit::crc_update</a></div><div class="ttdeci">crc_t crc_update(crc_t crc, const void *data, size_t data_len)</div><div class="ttdoc">Update the crc value with new data.</div><div class="ttdef"><b>Definition:</b> <a href="crc16ccitt__bit_8cpp_source.html#l00030">crc16ccitt_bit.cpp:30</a></div></div>
<div class="ttc" id="acrc16ccitt__bit_8hpp_html_a4134925356ad8f90472ef171fe955a1f"><div class="ttname"><a href="crc16ccitt__bit_8hpp.html#a4134925356ad8f90472ef171fe955a1f">ace_crc::crc16ccitt_bit::crc_finalize</a></div><div class="ttdeci">crc_t crc_finalize(crc_t crc)</div><div class="ttdoc">Calculate the final crc value.</div><div class="ttdef"><b>Definition:</b> <a href="crc16ccitt__bit_8hpp_source.html#l00099">crc16ccitt_bit.hpp:99</a></div></div>
<div class="ttc" id="acrc16ccitt__bit_8hpp_html_a5a452c1a176f3899bffa9a34fc6143bf"><div class="ttname"><a href="crc16ccitt__bit_8hpp.html#a5a452c1a176f3899bffa9a34fc6143bf">ace_crc::crc16ccitt_bit::crc_t</a></div><div class="ttdeci">uint16_t crc_t</div><div class="ttdoc">The type of the CRC values.</div><div class="ttdef"><b>Definition:</b> <a href="crc16ccitt__bit_8hpp_source.html#l00068">crc16ccitt_bit.hpp:68</a></div></div>
<div class="ttc" id="acrc16ccitt__bit_8hpp_html_af879dac709082a4f581814eb7bd867c6"><div class="ttname"><a href="crc16ccitt__bit_8hpp.html#af879dac709082a4f581814eb7bd867c6">ace_crc::crc16ccitt_bit::crc_init</a></div><div class="ttdeci">crc_t crc_init(void)</div><div class="ttdoc">Calculate the initial crc value.</div><div class="ttdef"><b>Definition:</b> <a href="crc16ccitt__bit_8hpp_source.html#l00076">crc16ccitt_bit.hpp:76</a></div></div>
</div><!-- fragment --><p>Auto converted to Arduino C++ on Fri Feb 3 16:16:46 PST 2023 by AceCRC (<a href="https://github.com/bxparks/AceCRC">https://github.com/bxparks/AceCRC</a>). DO NOT EDIT </p>

<p class="definition">Definition in file <a class="el" href="crc16modbus__nibble_8hpp_source.html">crc16modbus_nibble.hpp</a>.</p>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a id="a21dcdb9db1a18101e1a4194a6c8c17ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a21dcdb9db1a18101e1a4194a6c8c17ce">&#9670;&nbsp;</a></span>crc_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef uint16_t <a class="el" href="crc16modbus__nibble_8hpp.html#a21dcdb9db1a18101e1a4194a6c8c17ce">ace_crc::crc16modbus_nibble::crc_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The type of the CRC values. </p>
<p>This type must be big enough to contain at least 16 bits. </p>

<p class="definition">Definition at line <a class="el" href="crc16modbus__nibble_8hpp_source.html#l00068">68</a> of file <a class="el" href="crc16modbus__nibble_8hpp_source.html">crc16modbus_nibble.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a3af068bfa31d7b80ed986bf8a565768c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3af068bfa31d7b80ed986bf8a565768c">&#9670;&nbsp;</a></span>crc_calculate()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">crc_t ace_crc::crc16modbus_nibble::crc_calculate </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>data_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Calculate the crc in one-shot. </p>
<p>This is a convenience function added by AceCRC.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Pointer to a buffer of <em>data_len</em> bytes. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">data_len</td><td>Number of bytes in the <em>data</em> buffer. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="crc16modbus__nibble_8hpp_source.html#l00122">122</a> of file <a class="el" href="crc16modbus__nibble_8hpp_source.html">crc16modbus_nibble.hpp</a>.</p>

</div>
</div>
<a id="a3646fdb74671d13f43e751ab37dc1772"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3646fdb74671d13f43e751ab37dc1772">&#9670;&nbsp;</a></span>crc_finalize()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">crc_t ace_crc::crc16modbus_nibble::crc_finalize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="crc16modbus__nibble_8hpp.html#a21dcdb9db1a18101e1a4194a6c8c17ce">crc_t</a>&#160;</td>
          <td class="paramname"><em>crc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Calculate the final crc value. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">crc</td><td>The current crc value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The final crc value. </dd></dl>

<p class="definition">Definition at line <a class="el" href="crc16modbus__nibble_8hpp_source.html#l00109">109</a> of file <a class="el" href="crc16modbus__nibble_8hpp_source.html">crc16modbus_nibble.hpp</a>.</p>

</div>
</div>
<a id="a07e553ed323a606bfbd7cfd9cc4b479d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a07e553ed323a606bfbd7cfd9cc4b479d">&#9670;&nbsp;</a></span>crc_init()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">crc_t ace_crc::crc16modbus_nibble::crc_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Calculate the initial crc value. </p>
<dl class="section return"><dt>Returns</dt><dd>The initial crc value. </dd></dl>

<p class="definition">Definition at line <a class="el" href="crc16modbus__nibble_8hpp_source.html#l00086">86</a> of file <a class="el" href="crc16modbus__nibble_8hpp_source.html">crc16modbus_nibble.hpp</a>.</p>

</div>
</div>
<a id="a04c564d0be282a80c48ffc4ab3623c52"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a04c564d0be282a80c48ffc4ab3623c52">&#9670;&nbsp;</a></span>crc_reflect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">crc_t ace_crc::crc16modbus_nibble::crc_reflect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="crc16modbus__nibble_8hpp.html#a21dcdb9db1a18101e1a4194a6c8c17ce">crc_t</a>&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>data_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reflect all bits of a <em>data</em> word of <em>data_len</em> bytes. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>The data word to be reflected. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">data_len</td><td>The width of <em>data</em> expressed in number of bits. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The reflected data. </dd></dl>

<p class="definition">Definition at line <a class="el" href="crc16modbus__nibble_8cpp_source.html#l00043">43</a> of file <a class="el" href="crc16modbus__nibble_8cpp_source.html">crc16modbus_nibble.cpp</a>.</p>

</div>
</div>
<a id="af7f362995f974e6e73b42b7b20e7dca4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af7f362995f974e6e73b42b7b20e7dca4">&#9670;&nbsp;</a></span>crc_update()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">crc_t ace_crc::crc16modbus_nibble::crc_update </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="crc16modbus__nibble_8hpp.html#a21dcdb9db1a18101e1a4194a6c8c17ce">crc_t</a>&#160;</td>
          <td class="paramname"><em>crc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>data_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Update the crc value with new data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">crc</td><td>The current crc value. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Pointer to a buffer of <em>data_len</em> bytes. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">data_len</td><td>Number of bytes in the <em>data</em> buffer. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The updated crc value. </dd></dl>

<p class="definition">Definition at line <a class="el" href="crc16modbus__nibble_8cpp_source.html#l00057">57</a> of file <a class="el" href="crc16modbus__nibble_8cpp_source.html">crc16modbus_nibble.cpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="acb91882091aa134362cf7a7b2ce0bc7a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb91882091aa134362cf7a7b2ce0bc7a">&#9670;&nbsp;</a></span>CRC_ALGO_TABLE_DRIVEN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const uint8_t ace_crc::crc16modbus_nibble::CRC_ALGO_TABLE_DRIVEN = 1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The definition of the used algorithm. </p>
<p>This is not used anywhere in the generated code, but it may be used by the application code to call algorithm-specific code, if desired. </p>

<p class="definition">Definition at line <a class="el" href="crc16modbus__nibble_8hpp_source.html#l00060">60</a> of file <a class="el" href="crc16modbus__nibble_8hpp_source.html">crc16modbus_nibble.hpp</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
